از وقفه زیر می توانیدبرای تغییر رنگ فونت استفاده کنید
INT 10h / AH = 09h - write character and attribute at cursor position.
input:AL = character to display.BH = page number.BL = attribute.CX = number of times to write character.
مقدار attribute برابر یکی از مقدار های زیر باشد
bit color table:
character attribute is 8 bit value, low 4 bits set fore color, high 4 bits set background color.
note: the emulator and windows command line prompt do not support background blinking, however to make colors look the same in dos and in full screen mode it is required to turn off the background blinking.
HEX BIN COLOR0 0000 black0010 green1 0001 blue23 0011 cyan4 0100 redown 7 0111 lig5 0101 magenta 6 0110 b
rht gray 8 1000 dark gray 9 1001 light blue1100 light red D 1A 1010 light green B 1011 light cyan C
101 light magenta E 1110 yellowF 1111 white
مثلا کد زیر حرف d را به رنگ صورتی در پس زمینه سفید نشان می دهد
ORG 100H
mov cx,1
mov ah, 09h
mov al,'d'
mov bl , 11111101b
int 10h
نظرات شما عزیزان: